<template>
	<view style="height: 100vh;position: relative;" class="theme_bg_vice_color">
		<z-paging ref="paging" v-model="dataList" fixed @query="queryList">
			<view slot="top" class="theme_bg_color">
				<cu-custom id="nav" :isBack="true" :backColor="'text-black'">
					<block slot="backText">
						<view class="text-black ">
							我想玩的本
						</view>
					</block>
				</cu-custom>
			</view>
			<!-- <scroll-view scroll-y="true" class="grarg" style="background-color: #2a2a2a;" :style="{'height': scrollerHeight}"> -->
			<view class="grarg" >
				<view class="cu-card article">
					<view @click="$goPage('../../pageB/script/info?id='+item.id)" class="cu-item shadow padding-sm"
						style="background-color: #fff;position: relative;" v-for="(item,index) in dataList" :key="index"
						:style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]">
						<!-- <image src="../../static/icon/zd.png" class="zd" mode=""></image> -->
						<view class="flex justify-start">
							<image :src="$isHttp(item.picture)" style="width: 160rpx;height: 220rpx;border-radius: 10rpx;"
								mode="aspectFill"></image>
							<view class=" margin-left-sm" style="width: 520rpx;">
								<view class="flex justify-start margin-top-xs">
									<view class="text-bold" style="color: #000000;">{{item.name}}</view>
									<!-- <view class="cu-tag bg-yellow  sm round margin-left-sm">标签666</view> -->
								</view>
								<view class="margin-top-sm">
									<van-rate :value="item.averageScore/2" :size="18" allow-half color="#fbbd08"
										void-color="#adb0b3" void-icon="star" readonly />
								</view>
								<view class="">
									<view v-for="(item1,index1) in item.smallClasses" :key="index1"
										class="cu-tag line-black radius  margin-top-sm"
										style="background-color: #fff;color: #b2b1b6;">{{item1.small_name}}</view>
								</view>
								<view class="flex justify-between  margin-top-sm">
									<view class="flex align-end text-yellow">
										<!-- <view class="text-sm ">¥</view>
									<view class="text-lg text-bold">139</view>
									<view class="text-sm ">/位</view> -->
									</view>
									<!-- <view @click="$goPage('../../pageB/script/BeforeAppointment')"
									class="cu-btn bg-yellow sm round text-white">预约</view> -->
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</z-paging>
		<!-- </scroll-view> -->

	</view>
</template>

<script>
	import ZPagingMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin'
	export default {
		//注意这一步不要漏掉，必须注册mixins(如果全局引入了，就不要这一步，全局引入示例见main.js)
		mixins: [ZPagingMixin],
		data() {
			return {
				dataList: [],
			};
		},
		created() {

		},
		methods: {
			queryList(pageNo, pageSize) {
				this.$u.api.getWantList({
					userId: this.vuex_user.id,
					page: pageNo,
					number: pageSize
				}).then(res => {
					this.$refs.paging.complete(res.data);
				})
			}
		},


	}
</script>

<style lang="scss" scoped>
	.zd {
		position: absolute;
		top: 0;
		left: 0;
		width: 60rpx;
		height: 55rpx;
		z-index: 1;
	}

	// .grarg {
	// 	position: absolute;
	// 	top: 225rpx;
	// 	bottom: 100rpx;
	// }

	.box_whbrc {
		width: 90rpx;
		height: 60rpx;
		border-radius: 30rpx;
		// background-color: #cfa526;
		margin-right: 20rpx;
		text-align: center;
		line-height: 60rpx;
	}

	.bgc_cfa526 {
		background-color: #cfa526;
	}

	.scroll-view_H {
		white-space: nowrap;
		width: 100%;
	}

	.scroll-view-item_H {
		display: inline-block;
	}
</style>
